home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr18 / fbp95.zip / UPDATE.BAT < prev   
DOS Batch File  |  1995-01-20  |  6KB  |  181 lines

  1. @echo off
  2. rem **** This UPDATE.BAT file will copy and install the Football Pro '95
  3. rem **** version 1.02 patch disk to the specified hard drive and game
  4. rem **** directory.  If no parameters are specified, it will first
  5. rem **** check for the patch files already in the current directory.
  6. rem **** If they are not there, it will attempt to install using the
  7. rem **** default drives and directory, i.e., installing from A: to
  8. rem **** C:\SIERRA\FBPRO95.
  9.  
  10. echo This batch file will update FPS: Football Pro '95 version 1.00 to
  11. echo version 1.02.  The proper syntax for using this installation
  12. echo precedure is:
  13. echo.
  14. echo   UPDATE [source drive] [destination drive] [destination directory]
  15. echo.
  16. echo   Example:  UPDATE A: C: \SIERRA\FBPRO95
  17. echo.
  18. echo Note:  You must specify the drives and directories as 3 seperate
  19. echo parameters with a space between each one.
  20. echo.
  21. echo Before patching FB Pro '95, all saved games must be completed or
  22. echo deleted.  If you continue with the patching process, the saved
  23. echo games will be deleted for you.  If you do not want them deleted,
  24. echo press CTRL+C now to exit the installation script and finish the
  25. echo saved games before continuing with the patching process, or
  26. pause
  27.  
  28. rem **** check to see if there are no parameters specified
  29. if "%1"=="" goto noparms1
  30. if "%2"=="" goto noparms1
  31. if "%3"=="" goto noparms1
  32.  
  33. rem **** check the status of the 1st parameter and set F variable
  34. :chkfd
  35. if exist %1\patcha.rtp SET F=%1
  36. if exist %1:\patcha.rtp SET F=%1:
  37. if exist %F%\patcha.rtp goto chkhd
  38. goto needparm
  39.  
  40. rem **** check the status of the 2nd parameter and set H variable
  41. :chkhd
  42. if exist %2\.. goto needparm
  43. if exist %2\nul SET H=%2
  44. if exist %2:\nul SET H=%2:
  45. if exist %H%nul goto chkdr
  46. goto needparm
  47.  
  48. rem **** check the status of the 3rd parameter and set D variable
  49. :chkdr
  50. if exist %H%%3shell.exe goto notrail
  51. if exist %H%\%3\shell.exe SET D=\%3
  52. if exist %H%%3\shell.exe SET D=%3
  53. if not exist %H%%D%\shell.exe goto needparm
  54.  
  55. rem **** copy all files from disk 1 to game directory
  56. %H%
  57. cd %D%
  58. cls
  59. ren nflpa94.* nfl94.*
  60. ren tapes\game\nflpa94.* nfl94.*
  61. ren backup\nflpa94.* nfl94.*
  62. echo Copying patch files . . .
  63. copy %F%\*.*
  64.  
  65. echo.
  66. echo Now ready to begin applying the patch files . . .
  67. pause
  68.  
  69. rem **** patch version 1.00 to 1.02
  70. :patchit
  71. chk4game -y
  72. patch patcha.rtp
  73. patch patchb.rtp stock
  74. patch patchc.rtp
  75. patch patchd.rtp
  76. unchunk nflpa94.res . > nul
  77.  
  78. rem **** Check results of patch application.
  79. cls
  80. echo Now checking results of patching . . .
  81. fbcheck
  82. pause
  83. pppupdat -sync
  84. lgeupdat
  85. goto end
  86.  
  87.  
  88. rem **** If no parameters are specified, first check to see if the
  89. rem **** files are in the game directory.  If they are, go directly to
  90. rem **** patchit section, if not check the default drives and directory
  91. rem **** of A: C: \SIERRA\FBPRO95.  If they aren't there, goto needparm.
  92. :noparms1
  93. if not exist .\patch.exe goto nope
  94. if not exist .\patcha.rtp goto nope
  95. if not exist .\patchb.rtp goto nope
  96. if not exist .\patchc.rtp goto nope
  97. if not exist .\patchd.rtp goto nope
  98. if not exist .\nflpa94.res goto nope
  99. if not exist .\unchunk.exe goto nope
  100. if not exist .\shell.exe goto nope
  101. if not exist .\chk4game.exe goto nope
  102. goto patchit
  103.  
  104. :nope
  105. cls
  106. echo Now checking for existence of patch disk in drive A: and game in
  107. echo C:\SIERRA\FBPRO95.  If there is no disk in drive A:, you will
  108. echo receive an "Abort, Retry, Fail" message on this step.  To clear
  109. echo the message if it appears, either insert a formatted floppy disk
  110. echo in drive A: and press "R" to "Retry" or press "F" to "Fail" the
  111. echo check.
  112. echo.
  113. if not exist a:nul goto needparm
  114. if not exist a:\patcha.rtp goto needparm
  115. if not exist c:\sierra\fbpro95\shell.exe goto needparm
  116.  
  117. echo.
  118. echo Before patching Football Pro '95, all saved games must be completed
  119. echo or deleted.  If you continue with the patching process, the saved
  120. echo games will be deleted for you.  If you do not want them deleted,
  121. echo press CTRL+C now to exit the installation script and finish the
  122. echo saved games before continuing with the patching process, or
  123. pause
  124. echo.
  125. echo Prepared to install the Football Pro '95 version 1.02 patch
  126. echo from floppy disk in drive A: to C:\SIERRA\FBPRO95.
  127. echo.
  128. echo If this is NOT correct, press CTRL+C now to terminate
  129. echo execution of the install batch file, otherwise,
  130. pause
  131.  
  132. echo.
  133. echo Now copying patch files to C:\SIERRA\FBPRO95 . . .
  134.  
  135. rem **** Actual execution of the default copy process
  136. c:
  137. cd \sierra\fbpro95
  138. ren nflpa94.* nfl94.*
  139. ren tapes\game\nflpa94.* nfl94.*
  140. ren backup\nflpa94.* nfl94.*
  141. copy a:\*.*
  142. goto patchit
  143.  
  144.  
  145. rem **** Extra prompt for telling user not to put a trailing backslash on dir
  146. :notrail
  147. echo Don't use a trailing backslash on the directory name.
  148.  
  149. rem **** Bad or missing parameters procedure
  150. :needparm
  151. pause
  152. echo You did not specify the proper source and destination paths and/or
  153. ech drives.  The proper syntax for the installation is:
  154. echo.
  155. echo        UPDATE A: C: \SIERRA\FBPRO95
  156. echo.
  157. echo Replace the "A:" with the letter of the floppy drive with the patch
  158. echo disk.  Replace the "C:" with the letter of the hard drive where
  159. echo Football is installed.  Replace "\SIERRA\FBPRO95" with the directory
  160. echo where Football Pro '95 is installed.
  161. echo.
  162. echo Note that you may specify the drives with or without the colon (both
  163. echo A and A: are acceptable) and the directory with or without the
  164. echo leading backslash (both \SIERRA\FBPRO95 and SIERRA\FBPRO95 are
  165. echo acceptable).  The directory name cannot have a trailing backslash.
  166. echo.
  167. echo If no parameters are specified, the default drives and directory (as
  168. echo shown in the above example) will be tried before providing this
  169. echo prompt screen.
  170. echo.
  171. echo Please try again.
  172. pause
  173.  
  174. rem **** Clean everything up by deleting the patch files and
  175. rem **** clearing the variables.
  176. :end
  177. if exist %H%%D%\shell.exe del %H%%D%\patch*.*
  178. SET F=
  179. SET H=
  180. SET D=
  181.